package com.ytjj.qmyx.data.amqp.producer;

import com.ytjj.common.constants.QueueConstants;
import lombok.extern.log4j.Log4j;
import org.springframework.amqp.rabbit.core.RabbitTemplate;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Component;

/**
 * AMQP消息发送
 */
@Log4j
@Component
public class AmqpTestSend {

    @Autowired
    private RabbitTemplate rabbitTemplate;

    public void sendTest(Object amqpTest) {
        rabbitTemplate.convertAndSend(QueueConstants.TEST_QUEUE,amqpTest);
    }
}
